package com.lightkits.wms.controller;

import com.lightkits.wms.domain.pickreport.*;
import com.lightkits.wms.dto.pickreport.*;
import com.lightkits.framework.security.annotation.Anonymous;
import io.choerodon.core.iam.ResourceLevel;
import io.choerodon.swagger.annotation.Permission;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * PickReportService
 *
 * @author zhuangwei.zheng@hand-china.com
 * Created on 2019/5/7 14:37
 */
/*@SuppressWarnings("all")*/
/*@LightKitsContract(serviceName = "PickReportService", serviceNamespace = "center.soa.os-wms.com")*/
@RestController
@RequestMapping("/PickReportService")
public class PickReportController {
    @PostMapping(value = "/queryPickReports")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryPickReports")
    @ResponseBody
    public QueryPickReportsResponseType queryPickReports(@RequestBody(required = false) QueryPickReportsRequestType request) {
        return queryPickReportsExecutor.service(request);
    }

    @Autowired
    private QueryPickReportsExecutor queryPickReportsExecutor;

    @PostMapping(value = "/cancelPickReport")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/cancelPickReport")
    @ResponseBody
    public CancelPickReportResponseType cancelPickReport(@RequestBody(required = false) CancelPickReportRequestType request) {
        return cancelPickReportExecutor.service(request);
    }

    @Autowired
    private CancelPickReportExecutor cancelPickReportExecutor;

    @PostMapping(value = "/executePickReport")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/executePickReport")
    @ResponseBody
    public ExecutePickReportResponseType executePickReport(@RequestBody(required = false) ExecutePickReportRequestType request) {
        return executePickReportExecutor.service(request);
    }

    @Autowired
    private ExecutePickReportExecutor executePickReportExecutor;

    @PostMapping(value = "/queryPickReportDetail")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryPickReportDetail")
    @ResponseBody
    public QueryPickReportDetailResponseType queryPickReportDetail(@RequestBody(required = false) QueryPickReportDetailRequestType request) {
        return queryPickReportDetailExecutor.service(request);
    }

    @Autowired
    private QueryPickReportDetailExecutor queryPickReportDetailExecutor;
}
